# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  # Pick a unique cookie name to distinguish our session data from others'
  session :session_key => '_10pockets_session_id'
  init_gettext "10pockets"
  before_filter :set_term
  def logged_in?
    return @session[:user_id] ? true : false
  end
  
  def set_term
    @term = _('Search..') unless @term
  end
end
